package com.seu.data.structures.heapAndPriorityQueue.min;

/**
 * 最小堆
 * Interface for a (min)heap
 * Maintains a heap of integers where the root is the smallest value in the heap
 *
 * @author liangfeihu
 * @since 2020/6/13 00:09
 */
public interface MinHeapFace {
    /**
     * add int to MinHeap
     *
     * @param x
     */
    public void add(int x);

    /**
     * return but do not remove top of heap
     *
     * @return
     */
    public int get();

    /**
     * remove top of heap
     */
    public void remove();

    /**
     * replace top of heap with int
     *
     * @param x
     */
    public void replace(int x);

    /**
     * remove everything from heap
     */
    public void clear();

    /**
     * return true if nothing in heap, false otherwise
     *
     * @return
     */
    public boolean isEmpty();

    /**
     * return count of how many items in heap
     *
     * @return
     */
    public int size();
}
